import 'package:cook_dinner/config/include.dart';
import 'package:flutter/material.dart';

class SelfSetView extends StatelessWidget {
  const SelfSetView({Key? key, this.title, this.value, this.type = true})
      : super(key: key);

  final String? title;
  final String? value;
  final bool type;

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: 20.rpx),
      child: Container(
        width: HYSizeFit.screenWidth - 40.rpx,
        height: 56.rpx,
        decoration: BoxDecoration(
          border: Border(
            bottom: BorderSide(
              width: 1.rpx,
              color: const Color(0xffE1E1E1),
            ),
          ),
        ),
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(
              title ?? '',
              style: TextStyle(fontSize: 17.rpx, color: Colors.black),
            ),
            Row(
              children: [
                Text(
                  value ?? '',
                  style: TextStyle(
                      fontSize: 17.rpx,
                      color: type ? Colors.black : const Color(0xff9F9F9F)),
                ),
                SizedBox(
                  width: 30.rpx,
                  child: Image.asset(
                    'assets/images/arrat_right.png',
                    height: 16.rpx,
                  ),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
